<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */
use Hyperf\HttpServer\Router\Router;
Router::addRoute(['GET', 'POST', 'HEAD'], '/test', 'App\Controller\IndexController@test');
Router::addRoute(['GET', 'POST', 'HEAD'], '/', 'App\Controller\IndexController@index');
Router::addRoute(['GET','POST'], '/device/restart', 'App\Controller\IndexController@restart');
Router::addRoute(['GET','POST'], '/device/setParams', 'App\Controller\IndexController@setParams');
Router::addRoute(['GET','POST'], '/device/queryParams', 'App\Controller\IndexController@queryParams');
Router::addRoute(['GET','POST'], '/device/statusQuery', 'App\Controller\IndexController@statusQuery');
Router::addRoute(['GET','POST'], '/device/setMqtt', 'App\Controller\IndexController@setMqtt');
Router::addRoute(['GET','POST'], '/device/setElec', 'App\Controller\IndexController@setElec');
Router::addRoute(['GET','POST'], '/device/setStatus', 'App\Controller\IndexController@setStatus');



Router::addRoute(['POST'], '/v1/device/stop', 'App\Controller\IndexOldController@stop');
Router::addRoute(['POST'], '/v1/device/start', 'App\Controller\IndexOldController@start');
Router::addRoute(['POST'], '/v1/device/curr', 'App\Controller\IndexOldController@curr');
Router::addRoute(['POST'], '/v1/device/restart', 'App\Controller\IndexOldController@restart');
Router::addRoute(['POST'], '/v1/device/recharge', 'App\Controller\IndexOldController@recharge');
Router::addRoute(['POST'], '/v1/device/statusQuery', 'App\Controller\IndexOldController@statusQuery');
Router::addRoute(['POST'], '/v1/device/clear', 'App\Controller\IndexOldController@clear');
Router::addRoute(['POST'], '/v1/device/speed', 'App\Controller\IndexOldController@speed');
Router::addRoute(['POST'], '/v1/device/setMode', 'App\Controller\IndexOldController@setMode');
Router::addRoute(['POST'], '/v1/device/querySpeed', 'App\Controller\IndexOldController@querySpeed');
Router::addRoute(['POST'], '/v1/device/editDu', 'App\Controller\IndexOldController@editDu');

Router::get('/favicon.ico', function () {
    return '';
});


Router::addRoute(['GET','POST'], '/device/setHeart', 'App\Controller\IndexController@setHeart');
Router::addRoute(['GET','POST'], '/device/getToken', 'App\Controller\IndexController@getToken');
Router::addRoute(['GET','POST'], '/device/refreshToken', 'App\Controller\IndexController@refreshToken');
